package com.example.excel;

import java.time.LocalDateTime;

public class LocalDateTimeDemo {
   public static void main(String[] args) {
 LocalDateTime date = LocalDateTime.parse("2017-02-02T12:30:30");
      System.out.println(date);  
      LocalDateTime date1 = LocalDateTime.parse("2017-03-03T12:30:30");
      System.out.println(date1);
       System.out.println(date.compareTo(date1));
       LocalDateTime localDateTime = date.compareTo(date1) > 0 ? date1 : date;
       System.out.println(localDateTime);
   }
}